import torch
import torchvision
import torch.nn as nn
import numpy as np
import torchvision.transforms as transforms

# -----------------------------------------------
#   example : Basic autograd example 2 
# -----------------------------------------------

x=torch.rand(10,3)
y=torch.rand(10,2)

# 创建一个线性连接网络层
linear=nn.Linear(3,2)

# 打印
print('w:{} b:{}'.format(linear.weight,linear.bias))
'''
w:Parameter containing:
tensor([[ 0.1723, -0.2940, -0.2018],
        [ 0.3755,  0.1103,  0.2099]], requires_grad=True) b:Parameter containing:
tensor([-0.5155,  0.5038], requires_grad=True)
'''